package com.briup.category.domin;

import lombok.Data;

//图书类别，可以是表示⼀级分类，也可以表示⼆级分类
    @Data
    public class Category {

        private Integer id;
        private String name;
        private String description;
        //⽗类别id
        private Integer parentId;

        //get,set
        public Integer getId() {
            return id;
        }

        public void setId(Integer id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getDescription() {
            return description;
        }

        public void setDescription(String description) {
            this.description = description;
        }

        public Integer getParentId() {
            return parentId;
        }

        public void setParentId(Integer parentId) {
            this.parentId = parentId;
        }

        @Override
        public String toString() {
            return "CateGory{" +
                    "id=" + id +
                    ", name='" + name + '\'' +
                    ", description='" + description + '\'' +
                    ", parentId=" + parentId +
                    '}';
        }
    }
